//
//  MeTopBar.swift
//  Motion
//
//  Created by 悦月越悦 on 2021/3/6.
//

import SwiftUI

struct UserTopBar: View {
    var body: some View {
        HStack(){
            Spacer()
            HStack(spacing:15){
                Image("share")
                    .squareImage(size: 22)
                
                ZStack{
                    Image("envelope")
                        .squareImage(size: 22)
                    ZStack{
                        Circle()
                            .fill(Color.red)
                            .frame(width: 16, height: 16)
                        Text("3")
                            .font(.system(size: 12, weight: .bold, design: .default))
                            .foregroundColor(.white)
                    }
                    .offset(x: 10, y: -10)
                }
            }
        }
        .padding(16)
        .frame(height: 88,alignment: .top)
        .background(Color("topicPurple"))
    }
}

struct MeTopBar_Previews: PreviewProvider {
    static var previews: some View {
        UserTopBar()
    }
}
